package com.hxxy.wyp.petsLover.common.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.annotation.Id;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class News {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @NotNull(message = "新闻标题不能为空")
    private String newsTitle;
    @NotNull(message = "新闻不能为空")
    private String newsContent;
    @NotNull(message = "图片不能为空")
    private String newsPic;
    @TableField(exist = false)
    private List<String> newsPicVo;
    @NotNull(message = "类型不能为空")
    private String newsType;
    private LocalDateTime newsTime;
    private Long newsViews;
    private String newsIsSelected;

}
